.class public Lrexsee/core/widget/HScrollView;
.super Landroid/widget/FrameLayout;
.source "HScrollView.java"


# static fields
.field private static final ANIMATED_SCROLL_GAP:I = 0xfa

.field private static final INVALID_POINTER:I = -0x1

.field private static final MAX_SCROLL_FACTOR:F = 0.5f


# instance fields
.field private mActivePointerId:I

.field private mChildToScrollTo:Landroid/view/View;

.field private mIsBeingDragged:Z

.field private mIsLayoutDirty:Z

.field private mLastMotionX:F

.field private mLastScroll:J

.field private mMaximumVelocity:I

.field private mMinimumVelocity:I

.field private mScroller:Landroid/widget/Scroller;

.field private final mSmoothScrollingEnabled:Z

.field private final mTempRect:Landroid/graphics/Rect;

.field private mTouchSlop:I

.field private mVelocityTracker:Landroid/view/VelocityTracker;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 2
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    const/4 v1, 0x1

    .line 43
    invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 25
    new-instance v0, Landroid/graphics/Rect;

    invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V

    iput-object v0, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    .line 29
    iput-boolean v1, p0, Lrexsee/core/widget/HScrollView;->mIsLayoutDirty:Z

    .line 30
    const/4 v0, 0x0

    iput-object v0, p0, Lrexsee/core/widget/HScrollView;->mChildToScrollTo:Landroid/view/View;

    .line 31
    const/4 v0, 0x0

    iput-boolean v0, p0, Lrexsee/core/widget/HScrollView;->mIsBeingDragged:Z

    .line 33
    iput-boolean v1, p0, Lrexsee/core/widget/HScrollView;->mSmoothScrollingEnabled:Z

    .line 39
    const/4 v0, -0x1

    iput v0, p0, Lrexsee/core/widget/HScrollView;->mActivePointerId:I

    .line 44
    invoke-direct {p0}, Lrexsee/core/widget/HScrollView;->initScrollView()V

    .line 45
    return-void
.end method

.method private clamp(III)I
    .locals 1
    .param p1, "n"    # I
    .param p2, "my"    # I
    .param p3, "child"    # I

    .prologue
    .line 783
    if-ge p2, p3, :cond_0

    if-gez p1, :cond_1

    :cond_0
    const/4 v0, 0x0

    .line 785
    :goto_0
    return v0

    .line 784
    :cond_1
    add-int v0, p2, p1

    if-le v0, p3, :cond_2

    sub-int v0, p3, p2

    goto :goto_0

    :cond_2
    move v0, p1

    .line 785
    goto :goto_0
.end method

.method private doScrollX(I)V
    .locals 1
    .param p1, "delta"    # I

    .prologue
    .line 575
    if-eqz p1, :cond_0

    .line 577
    const/4 v0, 0x0

    invoke-virtual {p0, p1, v0}, Lrexsee/core/widget/HScrollView;->smoothScrollBy(II)V

    .line 582
    :cond_0
    return-void
.end method

.method private findFocusableViewInBounds(ZII)Landroid/view/View;
    .locals 11
    .param p1, "leftFocus"    # Z
    .param p2, "left"    # I
    .param p3, "right"    # I

    .prologue
    .line 707
    const/4 v10, 0x2

    invoke-virtual {p0, v10}, Lrexsee/core/widget/HScrollView;->getFocusables(I)Ljava/util/ArrayList;

    move-result-object v2

    .line 708
    .local v2, "focusables":Ljava/util/List;, "Ljava/util/List<Landroid/view/View;>;"
    const/4 v1, 0x0

    .line 710
    .local v1, "focusCandidate":Landroid/view/View;
    const/4 v3, 0x0

    .line 712
    .local v3, "foundFullyContainedFocusable":Z
    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v0

    .line 713
    .local v0, "count":I
    const/4 v4, 0x0

    .local v4, "i":I
    :goto_0
    if-lt v4, v0, :cond_0

    .line 747
    return-object v1

    .line 714
    :cond_0
    invoke-interface {v2, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Landroid/view/View;

    .line 715
    .local v5, "view":Landroid/view/View;
    invoke-virtual {v5}, Landroid/view/View;->getLeft()I

    move-result v8

    .line 716
    .local v8, "viewLeft":I
    invoke-virtual {v5}, Landroid/view/View;->getRight()I

    move-result v9

    .line 718
    .local v9, "viewRight":I
    if-ge p2, v9, :cond_1

    if-ge v8, p3, :cond_1

    .line 720
    if-ge p2, v8, :cond_2

    .line 721
    if-ge v9, p3, :cond_2

    const/4 v10, 0x1

    move v7, v10

    .line 723
    .local v7, "viewIsFullyContained":Z
    :goto_1
    if-nez v1, :cond_3

    .line 724
    move-object v1, v5

    .line 725
    move v3, v7

    .line 713
    .end local v7    # "viewIsFullyContained":Z
    :cond_1
    :goto_2
    add-int/lit8 v4, v4, 0x1

    goto :goto_0

    .line 721
    :cond_2
    const/4 v10, 0x0

    move v7, v10

    goto :goto_1

    .line 728
    .restart local v7    # "viewIsFullyContained":Z
    :cond_3
    if-eqz p1, :cond_4

    invoke-virtual {v1}, Landroid/view/View;->getLeft()I

    move-result v10

    if-lt v8, v10, :cond_6

    .line 729
    :cond_4
    if-nez p1, :cond_5

    invoke-virtual {v1}, Landroid/view/View;->getRight()I

    move-result v10

    if-gt v9, v10, :cond_6

    :cond_5
    const/4 v10, 0x0

    move v6, v10

    .line 731
    .local v6, "viewIsCloserToBoundary":Z
    :goto_3
    if-eqz v3, :cond_7

    .line 732
    if-eqz v7, :cond_1

    if-eqz v6, :cond_1

    .line 733
    move-object v1, v5

    goto :goto_2

    .line 729
    .end local v6    # "viewIsCloserToBoundary":Z
    :cond_6
    const/4 v10, 0x1

    move v6, v10

    goto :goto_3

    .line 736
    .restart local v6    # "viewIsCloserToBoundary":Z
    :cond_7
    if-eqz v7, :cond_8

    .line 737
    move-object v1, v5

    .line 738
    const/4 v3, 0x1

    goto :goto_2

    .line 739
    :cond_8
    if-eqz v6, :cond_1

    .line 740
    move-object v1, v5

    goto :goto_2
.end method

.method private findFocusableViewInMyBounds(ZILandroid/view/View;)Landroid/view/View;
    .locals 4
    .param p1, "leftFocus"    # Z
    .param p2, "left"    # I
    .param p3, "preferredFocusable"    # Landroid/view/View;

    .prologue
    .line 693
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getHorizontalFadingEdgeLength()I

    move-result v3

    div-int/lit8 v0, v3, 0x2

    .line 694
    .local v0, "fadingEdgeLength":I
    add-int v1, p2, v0

    .line 695
    .local v1, "leftWithoutFadingEdge":I
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getWidth()I

    move-result v3

    add-int/2addr v3, p2

    sub-int v2, v3, v0

    .line 697
    .local v2, "rightWithoutFadingEdge":I
    if-eqz p3, :cond_0

    .line 698
    invoke-virtual {p3}, Landroid/view/View;->getLeft()I

    move-result v3

    if-ge v3, v2, :cond_0

    .line 699
    invoke-virtual {p3}, Landroid/view/View;->getRight()I

    move-result v3

    if-le v3, v1, :cond_0

    move-object v3, p3

    .line 701
    :goto_0
    return-object v3

    :cond_0
    invoke-direct {p0, p1, v1, v2}, Lrexsee/core/widget/HScrollView;->findFocusableViewInBounds(ZII)Landroid/view/View;

    move-result-object v3

    goto :goto_0
.end method

.method private inChild(II)Z
    .locals 4
    .param p1, "x"    # I
    .param p2, "y"    # I

    .prologue
    const/4 v3, 0x0

    .line 397
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getChildCount()I

    move-result v2

    if-lez v2, :cond_2

    .line 398
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v1

    .line 399
    .local v1, "scrollX":I
    invoke-virtual {p0, v3}, Lrexsee/core/widget/HScrollView;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    .line 400
    .local v0, "child":Landroid/view/View;
    invoke-virtual {v0}, Landroid/view/View;->getTop()I

    move-result v2

    if-lt p2, v2, :cond_0

    .line 401
    invoke-virtual {v0}, Landroid/view/View;->getBottom()I

    move-result v2

    if-ge p2, v2, :cond_0

    .line 402
    invoke-virtual {v0}, Landroid/view/View;->getLeft()I

    move-result v2

    sub-int/2addr v2, v1

    if-lt p1, v2, :cond_0

    invoke-virtual {v0}, Landroid/view/View;->getRight()I

    move-result v2

    sub-int/2addr v2, v1

    if-lt p1, v2, :cond_1

    :cond_0
    move v2, v3

    .line 404
    .end local v0    # "child":Landroid/view/View;
    .end local v1    # "scrollX":I
    :goto_0
    return v2

    .line 400
    .restart local v0    # "child":Landroid/view/View;
    .restart local v1    # "scrollX":I
    :cond_1
    const/4 v2, 0x1

    goto :goto_0

    .end local v0    # "child":Landroid/view/View;
    .end local v1    # "scrollX":I
    :cond_2
    move v2, v3

    .line 404
    goto :goto_0
.end method

.method private initOrResetVelocityTracker()V
    .locals 1

    .prologue
    .line 408
    iget-object v0, p0, Lrexsee/core/widget/HScrollView;->mVelocityTracker:Landroid/view/VelocityTracker;

    if-nez v0, :cond_0

    .line 409
    invoke-static {}, Landroid/view/VelocityTracker;->obtain()Landroid/view/VelocityTracker;

    move-result-object v0

    iput-object v0, p0, Lrexsee/core/widget/HScrollView;->mVelocityTracker:Landroid/view/VelocityTracker;

    .line 413
    :goto_0
    return-void

    .line 411
    :cond_0
    iget-object v0, p0, Lrexsee/core/widget/HScrollView;->mVelocityTracker:Landroid/view/VelocityTracker;

    invoke-virtual {v0}, Landroid/view/VelocityTracker;->clear()V

    goto :goto_0
.end method

.method private initScrollView()V
    .locals 3

    .prologue
    .line 47
    new-instance v1, Landroid/widget/Scroller;

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-direct {v1, v2}, Landroid/widget/Scroller;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lrexsee/core/widget/HScrollView;->mScroller:Landroid/widget/Scroller;

    .line 48
    const/4 v1, 0x1

    invoke-virtual {p0, v1}, Lrexsee/core/widget/HScrollView;->setFocusable(Z)V

    .line 49
    const/high16 v1, 0x40000

    invoke-virtual {p0, v1}, Lrexsee/core/widget/HScrollView;->setDescendantFocusability(I)V

    .line 51
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-static {v1}, Landroid/view/ViewConfiguration;->get(Landroid/content/Context;)Landroid/view/ViewConfiguration;

    move-result-object v0

    .line 52
    .local v0, "configuration":Landroid/view/ViewConfiguration;
    invoke-virtual {v0}, Landroid/view/ViewConfiguration;->getScaledTouchSlop()I

    move-result v1

    iput v1, p0, Lrexsee/core/widget/HScrollView;->mTouchSlop:I

    .line 53
    invoke-virtual {v0}, Landroid/view/ViewConfiguration;->getScaledMinimumFlingVelocity()I

    move-result v1

    iput v1, p0, Lrexsee/core/widget/HScrollView;->mMinimumVelocity:I

    .line 54
    invoke-virtual {v0}, Landroid/view/ViewConfiguration;->getScaledMaximumFlingVelocity()I

    move-result v1

    iput v1, p0, Lrexsee/core/widget/HScrollView;->mMaximumVelocity:I

    .line 55
    return-void
.end method

.method private initVelocityTrackerIfNotExists()V
    .locals 1

    .prologue
    .line 416
    iget-object v0, p0, Lrexsee/core/widget/HScrollView;->mVelocityTracker:Landroid/view/VelocityTracker;

    if-nez v0, :cond_0

    .line 417
    invoke-static {}, Landroid/view/VelocityTracker;->obtain()Landroid/view/VelocityTracker;

    move-result-object v0

    iput-object v0, p0, Lrexsee/core/widget/HScrollView;->mVelocityTracker:Landroid/view/VelocityTracker;

    .line 419
    :cond_0
    return-void
.end method

.method private isOffScreen(Landroid/view/View;)Z
    .locals 2
    .param p1, "descendant"    # Landroid/view/View;

    .prologue
    const/4 v1, 0x0

    .line 563
    invoke-direct {p0, p1, v1}, Lrexsee/core/widget/HScrollView;->isWithinDeltaOfScreen(Landroid/view/View;I)Z

    move-result v0

    if-eqz v0, :cond_0

    move v0, v1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method private isViewDescendantOf(Landroid/view/View;Landroid/view/View;)Z
    .locals 3
    .param p1, "child"    # Landroid/view/View;
    .param p2, "parent"    # Landroid/view/View;

    .prologue
    const/4 v2, 0x1

    .line 751
    if-ne p1, p2, :cond_0

    move v1, v2

    .line 754
    :goto_0
    return v1

    .line 753
    :cond_0
    invoke-virtual {p1}, Landroid/view/View;->getParent()Landroid/view/ViewParent;

    move-result-object v0

    .line 754
    .local v0, "theParent":Landroid/view/ViewParent;
    instance-of v1, v0, Landroid/view/ViewGroup;

    if-eqz v1, :cond_1

    check-cast v0, Landroid/view/View;

    .end local v0    # "theParent":Landroid/view/ViewParent;
    invoke-direct {p0, v0, p2}, Lrexsee/core/widget/HScrollView;->isViewDescendantOf(Landroid/view/View;Landroid/view/View;)Z

    move-result v1

    if-eqz v1, :cond_1

    move v1, v2

    goto :goto_0

    :cond_1
    const/4 v1, 0x0

    goto :goto_0
.end method

.method private isWithinDeltaOfScreen(Landroid/view/View;I)Z
    .locals 3
    .param p1, "descendant"    # Landroid/view/View;
    .param p2, "delta"    # I

    .prologue
    .line 567
    iget-object v0, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    invoke-virtual {p1, v0}, Landroid/view/View;->getDrawingRect(Landroid/graphics/Rect;)V

    .line 568
    iget-object v0, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    invoke-virtual {p0, p1, v0}, Lrexsee/core/widget/HScrollView;->offsetDescendantRectToMyCoords(Landroid/view/View;Landroid/graphics/Rect;)V

    .line 570
    iget-object v0, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    iget v0, v0, Landroid/graphics/Rect;->right:I

    add-int/2addr v0, p2

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v1

    if-lt v0, v1, :cond_0

    .line 571
    iget-object v0, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    iget v0, v0, Landroid/graphics/Rect;->left:I

    sub-int/2addr v0, p2

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v1

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getWidth()I

    move-result v2

    add-int/2addr v1, v2

    if-gt v0, v1, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    .line 570
    goto :goto_0
.end method

.method private onSecondaryPointerUp(Landroid/view/MotionEvent;)V
    .locals 5
    .param p1, "ev"    # Landroid/view/MotionEvent;

    .prologue
    .line 433
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v3

    const v4, 0xff00

    and-int/2addr v3, v4

    shr-int/lit8 v2, v3, 0x8

    .line 435
    .local v2, "pointerIndex":I
    invoke-virtual {p1, v2}, Landroid/view/MotionEvent;->getPointerId(I)I

    move-result v1

    .line 436
    .local v1, "pointerId":I
    iget v3, p0, Lrexsee/core/widget/HScrollView;->mActivePointerId:I

    if-ne v1, v3, :cond_0

    .line 440
    if-nez v2, :cond_1

    const/4 v3, 0x1

    move v0, v3

    .line 441
    .local v0, "newPointerIndex":I
    :goto_0
    invoke-virtual {p1, v0}, Landroid/view/MotionEvent;->getX(I)F

    move-result v3

    iput v3, p0, Lrexsee/core/widget/HScrollView;->mLastMotionX:F

    .line 442
    invoke-virtual {p1, v0}, Landroid/view/MotionEvent;->getPointerId(I)I

    move-result v3

    iput v3, p0, Lrexsee/core/widget/HScrollView;->mActivePointerId:I

    .line 443
    iget-object v3, p0, Lrexsee/core/widget/HScrollView;->mVelocityTracker:Landroid/view/VelocityTracker;

    if-eqz v3, :cond_0

    .line 444
    iget-object v3, p0, Lrexsee/core/widget/HScrollView;->mVelocityTracker:Landroid/view/VelocityTracker;

    invoke-virtual {v3}, Landroid/view/VelocityTracker;->clear()V

    .line 447
    .end local v0    # "newPointerIndex":I
    :cond_0
    return-void

    .line 440
    :cond_1
    const/4 v3, 0x0

    move v0, v3

    goto :goto_0
.end method

.method private recycleVelocityTracker()V
    .locals 1

    .prologue
    .line 422
    iget-object v0, p0, Lrexsee/core/widget/HScrollView;->mVelocityTracker:Landroid/view/VelocityTracker;

    if-eqz v0, :cond_0

    .line 423
    iget-object v0, p0, Lrexsee/core/widget/HScrollView;->mVelocityTracker:Landroid/view/VelocityTracker;

    invoke-virtual {v0}, Landroid/view/VelocityTracker;->recycle()V

    .line 424
    const/4 v0, 0x0

    iput-object v0, p0, Lrexsee/core/widget/HScrollView;->mVelocityTracker:Landroid/view/VelocityTracker;

    .line 426
    :cond_0
    return-void
.end method

.method private scrollAndFocus(III)Z
    .locals 8
    .param p1, "direction"    # I
    .param p2, "left"    # I
    .param p3, "right"    # I

    .prologue
    .line 493
    const/4 v4, 0x1

    .line 495
    .local v4, "handled":Z
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getWidth()I

    move-result v6

    .line 496
    .local v6, "width":I
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v0

    .line 497
    .local v0, "containerLeft":I
    add-int v1, v0, v6

    .line 498
    .local v1, "containerRight":I
    const/16 v7, 0x11

    if-ne p1, v7, :cond_2

    const/4 v7, 0x1

    move v3, v7

    .line 500
    .local v3, "goLeft":Z
    :goto_0
    invoke-direct {p0, v3, p2, p3}, Lrexsee/core/widget/HScrollView;->findFocusableViewInBounds(ZII)Landroid/view/View;

    move-result-object v5

    .line 501
    .local v5, "newFocused":Landroid/view/View;
    if-nez v5, :cond_0

    .line 502
    move-object v5, p0

    .line 505
    :cond_0
    if-lt p2, v0, :cond_3

    if-gt p3, v1, :cond_3

    .line 506
    const/4 v4, 0x0

    .line 512
    :goto_1
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->findFocus()Landroid/view/View;

    move-result-object v7

    if-eq v5, v7, :cond_1

    invoke-virtual {v5, p1}, Landroid/view/View;->requestFocus(I)Z

    .line 514
    :cond_1
    return v4

    .line 498
    .end local v3    # "goLeft":Z
    .end local v5    # "newFocused":Landroid/view/View;
    :cond_2
    const/4 v7, 0x0

    move v3, v7

    goto :goto_0

    .line 508
    .restart local v3    # "goLeft":Z
    .restart local v5    # "newFocused":Landroid/view/View;
    :cond_3
    if-eqz v3, :cond_4

    sub-int v7, p2, v0

    move v2, v7

    .line 509
    .local v2, "delta":I
    :goto_2
    invoke-direct {p0, v2}, Lrexsee/core/widget/HScrollView;->doScrollX(I)V

    goto :goto_1

    .line 508
    .end local v2    # "delta":I
    :cond_4
    sub-int v7, p3, v1

    move v2, v7

    goto :goto_2
.end method

.method private scrollToChild(Landroid/view/View;)V
    .locals 2
    .param p1, "child"    # Landroid/view/View;

    .prologue
    .line 613
    iget-object v1, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    invoke-virtual {p1, v1}, Landroid/view/View;->getDrawingRect(Landroid/graphics/Rect;)V

    .line 614
    iget-object v1, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    invoke-virtual {p0, p1, v1}, Lrexsee/core/widget/HScrollView;->offsetDescendantRectToMyCoords(Landroid/view/View;Landroid/graphics/Rect;)V

    .line 615
    iget-object v1, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    invoke-virtual {p0, v1}, Lrexsee/core/widget/HScrollView;->computeScrollDeltaToGetChildRectOnScreen(Landroid/graphics/Rect;)I

    move-result v0

    .line 616
    .local v0, "scrollDelta":I
    if-eqz v0, :cond_0

    .line 617
    const/4 v1, 0x0

    invoke-virtual {p0, v0, v1}, Lrexsee/core/widget/HScrollView;->scrollBy(II)V

    .line 619
    :cond_0
    return-void
.end method

.method private scrollToChildRect(Landroid/graphics/Rect;Z)Z
    .locals 4
    .param p1, "rect"    # Landroid/graphics/Rect;
    .param p2, "immediate"    # Z

    .prologue
    const/4 v3, 0x0

    .line 622
    invoke-virtual {p0, p1}, Lrexsee/core/widget/HScrollView;->computeScrollDeltaToGetChildRectOnScreen(Landroid/graphics/Rect;)I

    move-result v0

    .line 623
    .local v0, "delta":I
    if-eqz v0, :cond_1

    const/4 v2, 0x1

    move v1, v2

    .line 624
    .local v1, "scroll":Z
    :goto_0
    if-eqz v1, :cond_0

    .line 625
    if-eqz p2, :cond_2

    .line 626
    invoke-virtual {p0, v0, v3}, Lrexsee/core/widget/HScrollView;->scrollBy(II)V

    .line 631
    :cond_0
    :goto_1
    return v1

    .end local v1    # "scroll":Z
    :cond_1
    move v1, v3

    .line 623
    goto :goto_0

    .line 628
    .restart local v1    # "scroll":Z
    :cond_2
    invoke-virtual {p0, v0, v3}, Lrexsee/core/widget/HScrollView;->smoothScrollBy(II)V

    goto :goto_1
.end method


# virtual methods
.method public arrowScroll(I)Z
    .locals 11
    .param p1, "direction"    # I

    .prologue
    const/16 v10, 0x42

    const/4 v9, 0x0

    .line 519
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->findFocus()Landroid/view/View;

    move-result-object v0

    .line 520
    .local v0, "currentFocused":Landroid/view/View;
    if-ne v0, p0, :cond_0

    const/4 v0, 0x0

    .line 522
    :cond_0
    invoke-static {}, Landroid/view/FocusFinder;->getInstance()Landroid/view/FocusFinder;

    move-result-object v7

    invoke-virtual {v7, p0, v0, p1}, Landroid/view/FocusFinder;->findNextFocus(Landroid/view/ViewGroup;Landroid/view/View;I)Landroid/view/View;

    move-result-object v4

    .line 524
    .local v4, "nextFocused":Landroid/view/View;
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getMaxScrollAmount()I

    move-result v3

    .line 526
    .local v3, "maxJump":I
    if-eqz v4, :cond_2

    invoke-direct {p0, v4, v3}, Lrexsee/core/widget/HScrollView;->isWithinDeltaOfScreen(Landroid/view/View;I)Z

    move-result v7

    if-eqz v7, :cond_2

    .line 527
    iget-object v7, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    invoke-virtual {v4, v7}, Landroid/view/View;->getDrawingRect(Landroid/graphics/Rect;)V

    .line 528
    iget-object v7, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    invoke-virtual {p0, v4, v7}, Lrexsee/core/widget/HScrollView;->offsetDescendantRectToMyCoords(Landroid/view/View;Landroid/graphics/Rect;)V

    .line 529
    iget-object v7, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    invoke-virtual {p0, v7}, Lrexsee/core/widget/HScrollView;->computeScrollDeltaToGetChildRectOnScreen(Landroid/graphics/Rect;)I

    move-result v6

    .line 530
    .local v6, "scrollDelta":I
    invoke-direct {p0, v6}, Lrexsee/core/widget/HScrollView;->doScrollX(I)V

    .line 531
    invoke-virtual {v4, p1}, Landroid/view/View;->requestFocus(I)Z

    .line 552
    :goto_0
    if-eqz v0, :cond_1

    invoke-virtual {v0}, Landroid/view/View;->isFocused()Z

    move-result v7

    if-eqz v7, :cond_1

    .line 553
    invoke-direct {p0, v0}, Lrexsee/core/widget/HScrollView;->isOffScreen(Landroid/view/View;)Z

    move-result v7

    if-eqz v7, :cond_1

    .line 554
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getDescendantFocusability()I

    move-result v2

    .line 555
    .local v2, "descendantFocusability":I
    const/high16 v7, 0x20000

    invoke-virtual {p0, v7}, Lrexsee/core/widget/HScrollView;->setDescendantFocusability(I)V

    .line 556
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->requestFocus()Z

    .line 557
    invoke-virtual {p0, v2}, Lrexsee/core/widget/HScrollView;->setDescendantFocusability(I)V

    .line 559
    .end local v2    # "descendantFocusability":I
    :cond_1
    const/4 v7, 0x1

    :goto_1
    return v7

    .line 534
    .end local v6    # "scrollDelta":I
    :cond_2
    move v6, v3

    .line 536
    .restart local v6    # "scrollDelta":I
    const/16 v7, 0x11

    if-ne p1, v7, :cond_4

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v7

    if-ge v7, v6, :cond_4

    .line 537
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v6

    .line 548
    :cond_3
    :goto_2
    if-nez v6, :cond_5

    move v7, v9

    goto :goto_1

    .line 538
    :cond_4
    if-ne p1, v10, :cond_3

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getChildCount()I

    move-result v7

    if-lez v7, :cond_3

    .line 540
    invoke-virtual {p0, v9}, Lrexsee/core/widget/HScrollView;->getChildAt(I)Landroid/view/View;

    move-result-object v7

    invoke-virtual {v7}, Landroid/view/View;->getRight()I

    move-result v1

    .line 542
    .local v1, "daRight":I
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v7

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getWidth()I

    move-result v8

    add-int v5, v7, v8

    .line 544
    .local v5, "screenRight":I
    sub-int v7, v1, v5

    if-ge v7, v3, :cond_3

    .line 545
    sub-int v6, v1, v5

    goto :goto_2

    .line 549
    .end local v1    # "daRight":I
    .end local v5    # "screenRight":I
    :cond_5
    if-ne p1, v10, :cond_6

    move v7, v6

    :goto_3
    invoke-direct {p0, v7}, Lrexsee/core/widget/HScrollView;->doScrollX(I)V

    goto :goto_0

    :cond_6
    neg-int v7, v6

    goto :goto_3
.end method

.method protected computeHorizontalScrollOffset()I
    .locals 2

    .prologue
    .line 95
    const/4 v0, 0x0

    invoke-super {p0}, Landroid/widget/FrameLayout;->computeHorizontalScrollOffset()I

    move-result v1

    invoke-static {v0, v1}, Ljava/lang/Math;->max(II)I

    move-result v0

    return v0
.end method

.method protected computeHorizontalScrollRange()I
    .locals 8

    .prologue
    const/4 v7, 0x0

    .line 77
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getChildCount()I

    move-result v1

    .line 78
    .local v1, "count":I
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getWidth()I

    move-result v5

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getPaddingLeft()I

    move-result v6

    sub-int/2addr v5, v6

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getPaddingRight()I

    move-result v6

    sub-int v0, v5, v6

    .line 79
    .local v0, "contentWidth":I
    if-nez v1, :cond_0

    move v5, v0

    .line 90
    :goto_0
    return v5

    .line 81
    :cond_0
    invoke-virtual {p0, v7}, Lrexsee/core/widget/HScrollView;->getChildAt(I)Landroid/view/View;

    move-result-object v5

    invoke-virtual {v5}, Landroid/view/View;->getRight()I

    move-result v3

    .line 82
    .local v3, "scrollRange":I
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v4

    .line 83
    .local v4, "scrollX":I
    sub-int v5, v3, v0

    invoke-static {v7, v5}, Ljava/lang/Math;->max(II)I

    move-result v2

    .line 84
    .local v2, "overscrollRight":I
    if-gez v4, :cond_2

    .line 85
    sub-int/2addr v3, v4

    :cond_1
    :goto_1
    move v5, v3

    .line 90
    goto :goto_0

    .line 86
    :cond_2
    if-le v4, v2, :cond_1

    .line 87
    sub-int v5, v4, v2

    add-int/2addr v3, v5

    goto :goto_1
.end method

.method public computeScroll()V
    .locals 6

    .prologue
    .line 129
    iget-object v4, p0, Lrexsee/core/widget/HScrollView;->mScroller:Landroid/widget/Scroller;

    invoke-virtual {v4}, Landroid/widget/Scroller;->computeScrollOffset()Z

    move-result v4

    if-eqz v4, :cond_2

    .line 130
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v0

    .line 131
    .local v0, "oldX":I
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollY()I

    move-result v1

    .line 132
    .local v1, "oldY":I
    iget-object v4, p0, Lrexsee/core/widget/HScrollView;->mScroller:Landroid/widget/Scroller;

    invoke-virtual {v4}, Landroid/widget/Scroller;->getCurrX()I

    move-result v2

    .line 133
    .local v2, "x":I
    iget-object v4, p0, Lrexsee/core/widget/HScrollView;->mScroller:Landroid/widget/Scroller;

    invoke-virtual {v4}, Landroid/widget/Scroller;->getCurrY()I

    move-result v3

    .line 134
    .local v3, "y":I
    if-ne v0, v2, :cond_0

    if-eq v1, v3, :cond_1

    .line 135
    :cond_0
    sub-int v4, v2, v0

    sub-int v5, v3, v1

    invoke-virtual {p0, v4, v5}, Lrexsee/core/widget/HScrollView;->scrollBy(II)V

    .line 136
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v4

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollY()I

    move-result v5

    invoke-virtual {p0, v4, v5, v0, v1}, Lrexsee/core/widget/HScrollView;->onScrollChanged(IIII)V

    .line 139
    :cond_1
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->awakenScrollBars()Z

    .line 140
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->postInvalidate()V

    .line 142
    .end local v0    # "oldX":I
    .end local v1    # "oldY":I
    .end local v2    # "x":I
    .end local v3    # "y":I
    :cond_2
    return-void
.end method

.method protected computeScrollDeltaToGetChildRectOnScreen(Landroid/graphics/Rect;)I
    .locals 10
    .param p1, "rect"    # Landroid/graphics/Rect;

    .prologue
    const/4 v9, 0x0

    .line 635
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getChildCount()I

    move-result v7

    if-nez v7, :cond_0

    move v7, v9

    .line 689
    :goto_0
    return v7

    .line 637
    :cond_0
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getWidth()I

    move-result v6

    .line 638
    .local v6, "width":I
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v3

    .line 639
    .local v3, "screenLeft":I
    add-int v4, v3, v6

    .line 641
    .local v4, "screenRight":I
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getHorizontalFadingEdgeLength()I

    move-result v1

    .line 644
    .local v1, "fadingEdge":I
    iget v7, p1, Landroid/graphics/Rect;->left:I

    if-lez v7, :cond_1

    .line 645
    add-int/2addr v3, v1

    .line 649
    :cond_1
    iget v7, p1, Landroid/graphics/Rect;->right:I

    invoke-virtual {p0, v9}, Lrexsee/core/widget/HScrollView;->getChildAt(I)Landroid/view/View;

    move-result-object v8

    invoke-virtual {v8}, Landroid/view/View;->getWidth()I

    move-result v8

    if-ge v7, v8, :cond_2

    .line 650
    sub-int/2addr v4, v1

    .line 653
    :cond_2
    const/4 v5, 0x0

    .line 655
    .local v5, "scrollXDelta":I
    iget v7, p1, Landroid/graphics/Rect;->right:I

    if-le v7, v4, :cond_5

    iget v7, p1, Landroid/graphics/Rect;->left:I

    if-le v7, v3, :cond_5

    .line 660
    invoke-virtual {p1}, Landroid/graphics/Rect;->width()I

    move-result v7

    if-le v7, v6, :cond_4

    .line 662
    iget v7, p1, Landroid/graphics/Rect;->left:I

    sub-int/2addr v7, v3

    add-int/2addr v5, v7

    .line 669
    :goto_1
    invoke-virtual {p0, v9}, Lrexsee/core/widget/HScrollView;->getChildAt(I)Landroid/view/View;

    move-result-object v7

    invoke-virtual {v7}, Landroid/view/View;->getRight()I

    move-result v2

    .line 670
    .local v2, "right":I
    sub-int v0, v2, v4

    .line 671
    .local v0, "distanceToRight":I
    invoke-static {v5, v0}, Ljava/lang/Math;->min(II)I

    move-result v5

    .end local v0    # "distanceToRight":I
    .end local v2    # "right":I
    :cond_3
    :goto_2
    move v7, v5

    .line 689
    goto :goto_0

    .line 665
    :cond_4
    iget v7, p1, Landroid/graphics/Rect;->right:I

    sub-int/2addr v7, v4

    add-int/2addr v5, v7

    goto :goto_1

    .line 673
    :cond_5
    iget v7, p1, Landroid/graphics/Rect;->left:I

    if-ge v7, v3, :cond_3

    iget v7, p1, Landroid/graphics/Rect;->right:I

    if-ge v7, v4, :cond_3

    .line 678
    invoke-virtual {p1}, Landroid/graphics/Rect;->width()I

    move-result v7

    if-le v7, v6, :cond_6

    .line 680
    iget v7, p1, Landroid/graphics/Rect;->right:I

    sub-int v7, v4, v7

    sub-int/2addr v5, v7

    .line 687
    :goto_3
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v7

    neg-int v7, v7

    invoke-static {v5, v7}, Ljava/lang/Math;->max(II)I

    move-result v5

    goto :goto_2

    .line 683
    :cond_6
    iget v7, p1, Landroid/graphics/Rect;->left:I

    sub-int v7, v3, v7

    sub-int/2addr v5, v7

    goto :goto_3
.end method

.method public fling(I)V
    .locals 14
    .param p1, "velocityX"    # I

    .prologue
    const/4 v4, 0x0

    .line 758
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getChildCount()I

    move-result v0

    if-lez v0, :cond_2

    .line 759
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getWidth()I

    move-result v0

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getPaddingRight()I

    move-result v1

    sub-int/2addr v0, v1

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getPaddingLeft()I

    move-result v1

    sub-int v13, v0, v1

    .line 760
    .local v13, "width":I
    invoke-virtual {p0, v4}, Lrexsee/core/widget/HScrollView;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0}, Landroid/view/View;->getWidth()I

    move-result v12

    .line 762
    .local v12, "right":I
    iget-object v0, p0, Lrexsee/core/widget/HScrollView;->mScroller:Landroid/widget/Scroller;

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v1

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollY()I

    move-result v2

    sub-int v3, v12, v13

    invoke-static {v4, v3}, Ljava/lang/Math;->max(II)I

    move-result v6

    move v3, p1

    move v5, v4

    move v7, v4

    move v8, v4

    invoke-virtual/range {v0 .. v8}, Landroid/widget/Scroller;->fling(IIIIIIII)V

    .line 764
    if-lez p1, :cond_3

    const/4 v0, 0x1

    move v10, v0

    .line 766
    .local v10, "movingRight":Z
    :goto_0
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->findFocus()Landroid/view/View;

    move-result-object v9

    .line 768
    .local v9, "currentFocused":Landroid/view/View;
    iget-object v0, p0, Lrexsee/core/widget/HScrollView;->mScroller:Landroid/widget/Scroller;

    invoke-virtual {v0}, Landroid/widget/Scroller;->getFinalX()I

    move-result v0

    .line 767
    invoke-direct {p0, v10, v0, v9}, Lrexsee/core/widget/HScrollView;->findFocusableViewInMyBounds(ZILandroid/view/View;)Landroid/view/View;

    move-result-object v11

    .line 770
    .local v11, "newFocused":Landroid/view/View;
    if-nez v11, :cond_0

    .line 771
    move-object v11, p0

    .line 774
    :cond_0
    if-eq v11, v9, :cond_1

    .line 775
    if-eqz v10, :cond_4

    const/16 v0, 0x42

    :goto_1
    invoke-virtual {v11, v0}, Landroid/view/View;->requestFocus(I)Z

    .line 778
    :cond_1
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->invalidate()V

    .line 780
    .end local v9    # "currentFocused":Landroid/view/View;
    .end local v10    # "movingRight":Z
    .end local v11    # "newFocused":Landroid/view/View;
    .end local v12    # "right":I
    .end local v13    # "width":I
    :cond_2
    return-void

    .restart local v12    # "right":I
    .restart local v13    # "width":I
    :cond_3
    move v10, v4

    .line 764
    goto :goto_0

    .line 775
    .restart local v9    # "currentFocused":Landroid/view/View;
    .restart local v10    # "movingRight":Z
    .restart local v11    # "newFocused":Landroid/view/View;
    :cond_4
    const/16 v0, 0x11

    goto :goto_1
.end method

.method public fullScroll(I)Z
    .locals 6
    .param p1, "direction"    # I

    .prologue
    const/4 v5, 0x0

    .line 474
    const/16 v4, 0x42

    if-ne p1, v4, :cond_1

    const/4 v4, 0x1

    move v1, v4

    .line 475
    .local v1, "right":Z
    :goto_0
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getWidth()I

    move-result v3

    .line 477
    .local v3, "width":I
    iget-object v4, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    iput v5, v4, Landroid/graphics/Rect;->left:I

    .line 478
    iget-object v4, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    iput v3, v4, Landroid/graphics/Rect;->right:I

    .line 480
    if-eqz v1, :cond_0

    .line 481
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getChildCount()I

    move-result v0

    .line 482
    .local v0, "count":I
    if-lez v0, :cond_0

    .line 483
    invoke-virtual {p0, v5}, Lrexsee/core/widget/HScrollView;->getChildAt(I)Landroid/view/View;

    move-result-object v2

    .line 484
    .local v2, "view":Landroid/view/View;
    iget-object v4, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    invoke-virtual {v2}, Landroid/view/View;->getRight()I

    move-result v5

    iput v5, v4, Landroid/graphics/Rect;->right:I

    .line 485
    iget-object v4, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    iget-object v5, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    iget v5, v5, Landroid/graphics/Rect;->right:I

    sub-int/2addr v5, v3

    iput v5, v4, Landroid/graphics/Rect;->left:I

    .line 489
    .end local v0    # "count":I
    .end local v2    # "view":Landroid/view/View;
    :cond_0
    iget-object v4, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    iget v4, v4, Landroid/graphics/Rect;->left:I

    iget-object v5, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    iget v5, v5, Landroid/graphics/Rect;->right:I

    invoke-direct {p0, p1, v4, v5}, Lrexsee/core/widget/HScrollView;->scrollAndFocus(III)Z

    move-result v4

    return v4

    .end local v1    # "right":Z
    .end local v3    # "width":I
    :cond_1
    move v1, v5

    .line 474
    goto :goto_0
.end method

.method protected getLeftFadingEdgeStrength()F
    .locals 3

    .prologue
    .line 59
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getChildCount()I

    move-result v1

    if-nez v1, :cond_0

    const/4 v1, 0x0

    .line 62
    :goto_0
    return v1

    .line 60
    :cond_0
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getHorizontalFadingEdgeLength()I

    move-result v0

    .line 61
    .local v0, "length":I
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v1

    if-ge v1, v0, :cond_1

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v1

    int-to-float v1, v1

    int-to-float v2, v0

    div-float/2addr v1, v2

    goto :goto_0

    .line 62
    :cond_1
    const/high16 v1, 0x3f800000    # 1.0f

    goto :goto_0
.end method

.method public getMaxScrollAmount()I
    .locals 3

    .prologue
    .line 429
    const/high16 v0, 0x3f000000    # 0.5f

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getRight()I

    move-result v1

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getLeft()I

    move-result v2

    sub-int/2addr v1, v2

    int-to-float v1, v1

    mul-float/2addr v0, v1

    float-to-int v0, v0

    return v0
.end method

.method protected getRightFadingEdgeStrength()F
    .locals 5

    .prologue
    .line 67
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getChildCount()I

    move-result v3

    if-nez v3, :cond_0

    const/4 v3, 0x0

    .line 72
    :goto_0
    return v3

    .line 68
    :cond_0
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getHorizontalFadingEdgeLength()I

    move-result v0

    .line 69
    .local v0, "length":I
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getWidth()I

    move-result v3

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getPaddingRight()I

    move-result v4

    sub-int v1, v3, v4

    .line 70
    .local v1, "rightEdge":I
    const/4 v3, 0x0

    invoke-virtual {p0, v3}, Lrexsee/core/widget/HScrollView;->getChildAt(I)Landroid/view/View;

    move-result-object v3

    invoke-virtual {v3}, Landroid/view/View;->getRight()I

    move-result v3

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v4

    sub-int/2addr v3, v4

    sub-int v2, v3, v1

    .line 71
    .local v2, "span":I
    if-ge v2, v0, :cond_1

    int-to-float v3, v2

    int-to-float v4, v0

    div-float/2addr v3, v4

    goto :goto_0

    .line 72
    :cond_1
    const/high16 v3, 0x3f800000    # 1.0f

    goto :goto_0
.end method

.method protected measureChild(Landroid/view/View;II)V
    .locals 6
    .param p1, "child"    # Landroid/view/View;
    .param p2, "parentWidthMeasureSpec"    # I
    .param p3, "parentHeightMeasureSpec"    # I

    .prologue
    const/4 v5, 0x0

    .line 100
    invoke-virtual {p1}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v2

    .line 105
    .local v2, "lp":Landroid/view/ViewGroup$LayoutParams;
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getPaddingTop()I

    move-result v3

    .line 106
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getPaddingBottom()I

    move-result v4

    add-int/2addr v3, v4

    iget v4, v2, Landroid/view/ViewGroup$LayoutParams;->height:I

    .line 105
    invoke-static {p3, v3, v4}, Lrexsee/core/widget/HScrollView;->getChildMeasureSpec(III)I

    move-result v0

    .line 108
    .local v0, "childHeightMeasureSpec":I
    invoke-static {v5, v5}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v1

    .line 110
    .local v1, "childWidthMeasureSpec":I
    invoke-virtual {p1, v1, v0}, Landroid/view/View;->measure(II)V

    .line 111
    return-void
.end method

.method protected measureChildWithMargins(Landroid/view/View;IIII)V
    .locals 5
    .param p1, "child"    # Landroid/view/View;
    .param p2, "parentWidthMeasureSpec"    # I
    .param p3, "widthUsed"    # I
    .param p4, "parentHeightMeasureSpec"    # I
    .param p5, "heightUsed"    # I

    .prologue
    .line 116
    invoke-virtual {p1}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v2

    check-cast v2, Landroid/view/ViewGroup$MarginLayoutParams;

    .line 119
    .local v2, "lp":Landroid/view/ViewGroup$MarginLayoutParams;
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getPaddingTop()I

    move-result v3

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getPaddingBottom()I

    move-result v4

    add-int/2addr v3, v4

    iget v4, v2, Landroid/view/ViewGroup$MarginLayoutParams;->topMargin:I

    add-int/2addr v3, v4

    iget v4, v2, Landroid/view/ViewGroup$MarginLayoutParams;->bottomMargin:I

    add-int/2addr v3, v4

    add-int/2addr v3, p5

    .line 120
    iget v4, v2, Landroid/view/ViewGroup$MarginLayoutParams;->height:I

    .line 118
    invoke-static {p4, v3, v4}, Lrexsee/core/widget/HScrollView;->getChildMeasureSpec(III)I

    move-result v0

    .line 122
    .local v0, "childHeightMeasureSpec":I
    iget v3, v2, Landroid/view/ViewGroup$MarginLayoutParams;->leftMargin:I

    iget v4, v2, Landroid/view/ViewGroup$MarginLayoutParams;->rightMargin:I

    add-int/2addr v3, v4

    const/4 v4, 0x0

    .line 121
    invoke-static {v3, v4}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v1

    .line 124
    .local v1, "childWidthMeasureSpec":I
    invoke-virtual {p1, v1, v0}, Landroid/view/View;->measure(II)V

    .line 125
    return-void
.end method

.method public onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 10
    .param p1, "ev"    # Landroid/view/MotionEvent;

    .prologue
    const/4 v7, -0x1

    const/4 v9, 0x1

    const/4 v8, 0x0

    .line 177
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    .line 178
    .local v0, "action":I
    const/4 v6, 0x2

    if-ne v0, v6, :cond_0

    iget-boolean v6, p0, Lrexsee/core/widget/HScrollView;->mIsBeingDragged:Z

    if-eqz v6, :cond_0

    move v6, v9

    .line 237
    :goto_0
    return v6

    .line 180
    :cond_0
    and-int/lit16 v6, v0, 0xff

    packed-switch v6, :pswitch_data_0

    .line 237
    :cond_1
    :goto_1
    :pswitch_0
    iget-boolean v6, p0, Lrexsee/core/widget/HScrollView;->mIsBeingDragged:Z

    goto :goto_0

    .line 182
    :pswitch_1
    iget v1, p0, Lrexsee/core/widget/HScrollView;->mActivePointerId:I

    .line 183
    .local v1, "activePointerId":I
    if-eq v1, v7, :cond_1

    .line 188
    invoke-virtual {p1, v1}, Landroid/view/MotionEvent;->findPointerIndex(I)I

    move-result v3

    .line 189
    .local v3, "pointerIndex":I
    invoke-virtual {p1, v3}, Landroid/view/MotionEvent;->getX(I)F

    move-result v4

    .line 190
    .local v4, "x":F
    iget v6, p0, Lrexsee/core/widget/HScrollView;->mLastMotionX:F

    sub-float v6, v4, v6

    invoke-static {v6}, Ljava/lang/Math;->abs(F)F

    move-result v6

    float-to-int v5, v6

    .line 191
    .local v5, "xDiff":I
    iget v6, p0, Lrexsee/core/widget/HScrollView;->mTouchSlop:I

    if-le v5, v6, :cond_1

    .line 192
    iput-boolean v9, p0, Lrexsee/core/widget/HScrollView;->mIsBeingDragged:Z

    .line 193
    iput v4, p0, Lrexsee/core/widget/HScrollView;->mLastMotionX:F

    .line 194
    invoke-direct {p0}, Lrexsee/core/widget/HScrollView;->initVelocityTrackerIfNotExists()V

    .line 195
    iget-object v6, p0, Lrexsee/core/widget/HScrollView;->mVelocityTracker:Landroid/view/VelocityTracker;

    invoke-virtual {v6, p1}, Landroid/view/VelocityTracker;->addMovement(Landroid/view/MotionEvent;)V

    .line 196
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getParent()Landroid/view/ViewParent;

    move-result-object v6

    if-eqz v6, :cond_1

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getParent()Landroid/view/ViewParent;

    move-result-object v6

    invoke-interface {v6, v9}, Landroid/view/ViewParent;->requestDisallowInterceptTouchEvent(Z)V

    goto :goto_1

    .line 202
    .end local v1    # "activePointerId":I
    .end local v3    # "pointerIndex":I
    .end local v4    # "x":F
    .end local v5    # "xDiff":I
    :pswitch_2
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v4

    .line 203
    .restart local v4    # "x":F
    float-to-int v6, v4

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v7

    float-to-int v7, v7

    invoke-direct {p0, v6, v7}, Lrexsee/core/widget/HScrollView;->inChild(II)Z

    move-result v6

    if-nez v6, :cond_2

    .line 204
    iput-boolean v8, p0, Lrexsee/core/widget/HScrollView;->mIsBeingDragged:Z

    .line 205
    invoke-direct {p0}, Lrexsee/core/widget/HScrollView;->recycleVelocityTracker()V

    goto :goto_1

    .line 209
    :cond_2
    iput v4, p0, Lrexsee/core/widget/HScrollView;->mLastMotionX:F

    .line 210
    invoke-virtual {p1, v8}, Landroid/view/MotionEvent;->getPointerId(I)I

    move-result v6

    iput v6, p0, Lrexsee/core/widget/HScrollView;->mActivePointerId:I

    .line 212
    invoke-direct {p0}, Lrexsee/core/widget/HScrollView;->initOrResetVelocityTracker()V

    .line 213
    iget-object v6, p0, Lrexsee/core/widget/HScrollView;->mVelocityTracker:Landroid/view/VelocityTracker;

    invoke-virtual {v6, p1}, Landroid/view/VelocityTracker;->addMovement(Landroid/view/MotionEvent;)V

    .line 215
    iget-object v6, p0, Lrexsee/core/widget/HScrollView;->mScroller:Landroid/widget/Scroller;

    invoke-virtual {v6}, Landroid/widget/Scroller;->isFinished()Z

    move-result v6

    if-eqz v6, :cond_3

    move v6, v8

    :goto_2
    iput-boolean v6, p0, Lrexsee/core/widget/HScrollView;->mIsBeingDragged:Z

    goto :goto_1

    :cond_3
    move v6, v9

    goto :goto_2

    .line 221
    .end local v4    # "x":F
    :pswitch_3
    iput-boolean v8, p0, Lrexsee/core/widget/HScrollView;->mIsBeingDragged:Z

    .line 222
    iput v7, p0, Lrexsee/core/widget/HScrollView;->mActivePointerId:I

    .line 223
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->invalidate()V

    goto :goto_1

    .line 226
    :pswitch_4
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getActionIndex()I

    move-result v2

    .line 227
    .local v2, "index":I
    invoke-virtual {p1, v2}, Landroid/view/MotionEvent;->getX(I)F

    move-result v6

    iput v6, p0, Lrexsee/core/widget/HScrollView;->mLastMotionX:F

    .line 228
    invoke-virtual {p1, v2}, Landroid/view/MotionEvent;->getPointerId(I)I

    move-result v6

    iput v6, p0, Lrexsee/core/widget/HScrollView;->mActivePointerId:I

    goto/16 :goto_1

    .line 232
    .end local v2    # "index":I
    :pswitch_5
    invoke-direct {p0, p1}, Lrexsee/core/widget/HScrollView;->onSecondaryPointerUp(Landroid/view/MotionEvent;)V

    .line 233
    iget v6, p0, Lrexsee/core/widget/HScrollView;->mActivePointerId:I

    invoke-virtual {p1, v6}, Landroid/view/MotionEvent;->findPointerIndex(I)I

    move-result v6

    invoke-virtual {p1, v6}, Landroid/view/MotionEvent;->getX(I)F

    move-result v6

    iput v6, p0, Lrexsee/core/widget/HScrollView;->mLastMotionX:F

    goto/16 :goto_1

    .line 180
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_2
        :pswitch_3
        :pswitch_1
        :pswitch_3
        :pswitch_0
        :pswitch_4
        :pswitch_5
    .end packed-switch
.end method

.method protected onLayout(ZIIII)V
    .locals 2
    .param p1, "changed"    # Z
    .param p2, "l"    # I
    .param p3, "t"    # I
    .param p4, "r"    # I
    .param p5, "b"    # I

    .prologue
    .line 358
    invoke-super/range {p0 .. p5}, Landroid/widget/FrameLayout;->onLayout(ZIIII)V

    .line 359
    const/4 v0, 0x0

    iput-boolean v0, p0, Lrexsee/core/widget/HScrollView;->mIsLayoutDirty:Z

    .line 360
    iget-object v0, p0, Lrexsee/core/widget/HScrollView;->mChildToScrollTo:Landroid/view/View;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lrexsee/core/widget/HScrollView;->mChildToScrollTo:Landroid/view/View;

    invoke-direct {p0, v0, p0}, Lrexsee/core/widget/HScrollView;->isViewDescendantOf(Landroid/view/View;Landroid/view/View;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 361
    iget-object v0, p0, Lrexsee/core/widget/HScrollView;->mChildToScrollTo:Landroid/view/View;

    invoke-direct {p0, v0}, Lrexsee/core/widget/HScrollView;->scrollToChild(Landroid/view/View;)V

    .line 363
    :cond_0
    const/4 v0, 0x0

    iput-object v0, p0, Lrexsee/core/widget/HScrollView;->mChildToScrollTo:Landroid/view/View;

    .line 364
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v0

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollY()I

    move-result v1

    invoke-virtual {p0, v0, v1}, Lrexsee/core/widget/HScrollView;->scrollTo(II)V

    .line 365
    return-void
.end method

.method protected onMeasure(II)V
    .locals 8
    .param p1, "widthMeasureSpec"    # I
    .param p2, "heightMeasureSpec"    # I

    .prologue
    .line 146
    invoke-super {p0, p1, p2}, Landroid/widget/FrameLayout;->onMeasure(II)V

    .line 148
    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getMode(I)I

    move-result v5

    .line 149
    .local v5, "widthMode":I
    if-nez v5, :cond_1

    .line 165
    :cond_0
    :goto_0
    return-void

    .line 151
    :cond_1
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getChildCount()I

    move-result v6

    if-lez v6, :cond_0

    .line 152
    const/4 v6, 0x0

    invoke-virtual {p0, v6}, Lrexsee/core/widget/HScrollView;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    .line 153
    .local v0, "child":Landroid/view/View;
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getMeasuredWidth()I

    move-result v4

    .line 154
    .local v4, "width":I
    invoke-virtual {v0}, Landroid/view/View;->getMeasuredWidth()I

    move-result v6

    if-ge v6, v4, :cond_0

    .line 155
    invoke-virtual {v0}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v3

    check-cast v3, Landroid/widget/FrameLayout$LayoutParams;

    .line 157
    .local v3, "lp":Landroid/widget/FrameLayout$LayoutParams;
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getPaddingTop()I

    move-result v6

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getPaddingBottom()I

    move-result v7

    add-int/2addr v6, v7

    iget v7, v3, Landroid/widget/FrameLayout$LayoutParams;->height:I

    invoke-static {p2, v6, v7}, Lrexsee/core/widget/HScrollView;->getChildMeasureSpec(III)I

    move-result v1

    .line 158
    .local v1, "childHeightMeasureSpec":I
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getPaddingLeft()I

    move-result v6

    sub-int/2addr v4, v6

    .line 159
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getPaddingRight()I

    move-result v6

    sub-int/2addr v4, v6

    .line 160
    const/high16 v6, 0x40000000    # 2.0f

    invoke-static {v4, v6}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v2

    .line 162
    .local v2, "childWidthMeasureSpec":I
    invoke-virtual {v0, v2, v1}, Landroid/view/View;->measure(II)V

    goto :goto_0
.end method

.method protected onRequestFocusInDescendants(ILandroid/graphics/Rect;)Z
    .locals 4
    .param p1, "direction"    # I
    .param p2, "previouslyFocusedRect"    # Landroid/graphics/Rect;

    .prologue
    const/4 v3, 0x0

    .line 326
    const/4 v1, 0x2

    if-ne p1, v1, :cond_1

    .line 327
    const/16 p1, 0x42

    .line 332
    :cond_0
    :goto_0
    if-nez p2, :cond_2

    .line 333
    invoke-static {}, Landroid/view/FocusFinder;->getInstance()Landroid/view/FocusFinder;

    move-result-object v1

    const/4 v2, 0x0

    invoke-virtual {v1, p0, v2, p1}, Landroid/view/FocusFinder;->findNextFocus(Landroid/view/ViewGroup;Landroid/view/View;I)Landroid/view/View;

    move-result-object v1

    move-object v0, v1

    .line 337
    .local v0, "nextFocus":Landroid/view/View;
    :goto_1
    if-nez v0, :cond_3

    move v1, v3

    .line 341
    :goto_2
    return v1

    .line 328
    .end local v0    # "nextFocus":Landroid/view/View;
    :cond_1
    const/4 v1, 0x1

    if-ne p1, v1, :cond_0

    .line 329
    const/16 p1, 0x11

    goto :goto_0

    .line 334
    :cond_2
    invoke-static {}, Landroid/view/FocusFinder;->getInstance()Landroid/view/FocusFinder;

    move-result-object v1

    invoke-virtual {v1, p0, p2, p1}, Landroid/view/FocusFinder;->findNextFocusFromRect(Landroid/view/ViewGroup;Landroid/graphics/Rect;I)Landroid/view/View;

    move-result-object v1

    move-object v0, v1

    goto :goto_1

    .line 339
    .restart local v0    # "nextFocus":Landroid/view/View;
    :cond_3
    invoke-direct {p0, v0}, Lrexsee/core/widget/HScrollView;->isOffScreen(Landroid/view/View;)Z

    move-result v1

    if-eqz v1, :cond_4

    move v1, v3

    goto :goto_2

    .line 341
    :cond_4
    invoke-virtual {v0, p1, p2}, Landroid/view/View;->requestFocus(ILandroid/graphics/Rect;)Z

    move-result v1

    goto :goto_2
.end method

.method protected onSizeChanged(IIII)V
    .locals 5
    .param p1, "w"    # I
    .param p2, "h"    # I
    .param p3, "oldw"    # I
    .param p4, "oldh"    # I

    .prologue
    .line 369
    invoke-super {p0, p1, p2, p3, p4}, Landroid/widget/FrameLayout;->onSizeChanged(IIII)V

    .line 370
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->findFocus()Landroid/view/View;

    move-result-object v0

    .line 371
    .local v0, "currentFocused":Landroid/view/View;
    if-eqz v0, :cond_0

    if-ne p0, v0, :cond_1

    .line 381
    :cond_0
    :goto_0
    return-void

    .line 373
    :cond_1
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getRight()I

    move-result v3

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getLeft()I

    move-result v4

    sub-int v1, v3, v4

    .line 375
    .local v1, "maxJump":I
    invoke-direct {p0, v0, v1}, Lrexsee/core/widget/HScrollView;->isWithinDeltaOfScreen(Landroid/view/View;I)Z

    move-result v3

    if-eqz v3, :cond_0

    .line 376
    iget-object v3, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    invoke-virtual {v0, v3}, Landroid/view/View;->getDrawingRect(Landroid/graphics/Rect;)V

    .line 377
    iget-object v3, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    invoke-virtual {p0, v0, v3}, Lrexsee/core/widget/HScrollView;->offsetDescendantRectToMyCoords(Landroid/view/View;Landroid/graphics/Rect;)V

    .line 378
    iget-object v3, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    invoke-virtual {p0, v3}, Lrexsee/core/widget/HScrollView;->computeScrollDeltaToGetChildRectOnScreen(Landroid/graphics/Rect;)I

    move-result v2

    .line 379
    .local v2, "scrollDelta":I
    invoke-direct {p0, v2}, Lrexsee/core/widget/HScrollView;->doScrollX(I)V

    goto :goto_0
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 13
    .param p1, "ev"    # Landroid/view/MotionEvent;

    .prologue
    const/4 v12, 0x1

    const/4 v11, -0x1

    const/4 v10, 0x0

    .line 242
    invoke-direct {p0}, Lrexsee/core/widget/HScrollView;->initVelocityTrackerIfNotExists()V

    .line 243
    iget-object v8, p0, Lrexsee/core/widget/HScrollView;->mVelocityTracker:Landroid/view/VelocityTracker;

    invoke-virtual {v8, p1}, Landroid/view/VelocityTracker;->addMovement(Landroid/view/MotionEvent;)V

    .line 245
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    .line 247
    .local v0, "action":I
    and-int/lit16 v8, v0, 0xff

    packed-switch v8, :pswitch_data_0

    :cond_0
    :goto_0
    :pswitch_0
    move v8, v12

    .line 309
    :goto_1
    return v8

    .line 249
    :pswitch_1
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getChildCount()I

    move-result v8

    if-eqz v8, :cond_1

    move v8, v12

    :goto_2
    iput-boolean v8, p0, Lrexsee/core/widget/HScrollView;->mIsBeingDragged:Z

    .line 250
    iget-boolean v8, p0, Lrexsee/core/widget/HScrollView;->mIsBeingDragged:Z

    if-nez v8, :cond_2

    move v8, v10

    goto :goto_1

    :cond_1
    move v8, v10

    .line 249
    goto :goto_2

    .line 252
    :cond_2
    iget-object v8, p0, Lrexsee/core/widget/HScrollView;->mScroller:Landroid/widget/Scroller;

    invoke-virtual {v8}, Landroid/widget/Scroller;->isFinished()Z

    move-result v8

    if-nez v8, :cond_3

    .line 253
    iget-object v8, p0, Lrexsee/core/widget/HScrollView;->mScroller:Landroid/widget/Scroller;

    invoke-virtual {v8}, Landroid/widget/Scroller;->abortAnimation()V

    .line 257
    :cond_3
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v8

    iput v8, p0, Lrexsee/core/widget/HScrollView;->mLastMotionX:F

    .line 258
    invoke-virtual {p1, v10}, Landroid/view/MotionEvent;->getPointerId(I)I

    move-result v8

    iput v8, p0, Lrexsee/core/widget/HScrollView;->mActivePointerId:I

    goto :goto_0

    .line 262
    :pswitch_2
    iget-boolean v8, p0, Lrexsee/core/widget/HScrollView;->mIsBeingDragged:Z

    if-eqz v8, :cond_0

    .line 264
    iget v8, p0, Lrexsee/core/widget/HScrollView;->mActivePointerId:I

    invoke-virtual {p1, v8}, Landroid/view/MotionEvent;->findPointerIndex(I)I

    move-result v1

    .line 265
    .local v1, "activePointerIndex":I
    invoke-virtual {p1, v1}, Landroid/view/MotionEvent;->getX(I)F

    move-result v7

    .line 266
    .local v7, "x":F
    iget v8, p0, Lrexsee/core/widget/HScrollView;->mLastMotionX:F

    sub-float/2addr v8, v7

    float-to-int v2, v8

    .line 267
    .local v2, "deltaX":I
    iput v7, p0, Lrexsee/core/widget/HScrollView;->mLastMotionX:F

    .line 269
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v4

    .line 270
    .local v4, "oldX":I
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollY()I

    move-result v5

    .line 271
    .local v5, "oldY":I
    invoke-virtual {p0, v2, v10}, Lrexsee/core/widget/HScrollView;->scrollBy(II)V

    .line 272
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v8

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollY()I

    move-result v9

    invoke-virtual {p0, v8, v9, v4, v5}, Lrexsee/core/widget/HScrollView;->onScrollChanged(IIII)V

    goto :goto_0

    .line 277
    .end local v1    # "activePointerIndex":I
    .end local v2    # "deltaX":I
    .end local v4    # "oldX":I
    .end local v5    # "oldY":I
    .end local v7    # "x":F
    :pswitch_3
    iget-boolean v8, p0, Lrexsee/core/widget/HScrollView;->mIsBeingDragged:Z

    if-eqz v8, :cond_0

    .line 278
    iget-object v6, p0, Lrexsee/core/widget/HScrollView;->mVelocityTracker:Landroid/view/VelocityTracker;

    .line 279
    .local v6, "velocityTracker":Landroid/view/VelocityTracker;
    const/16 v8, 0x3e8

    iget v9, p0, Lrexsee/core/widget/HScrollView;->mMaximumVelocity:I

    int-to-float v9, v9

    invoke-virtual {v6, v8, v9}, Landroid/view/VelocityTracker;->computeCurrentVelocity(IF)V

    .line 280
    iget v8, p0, Lrexsee/core/widget/HScrollView;->mActivePointerId:I

    invoke-virtual {v6, v8}, Landroid/view/VelocityTracker;->getXVelocity(I)F

    move-result v8

    float-to-int v3, v8

    .line 282
    .local v3, "initialVelocity":I
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getChildCount()I

    move-result v8

    if-lez v8, :cond_4

    .line 283
    invoke-static {v3}, Ljava/lang/Math;->abs(I)I

    move-result v8

    iget v9, p0, Lrexsee/core/widget/HScrollView;->mMinimumVelocity:I

    if-le v8, v9, :cond_5

    .line 284
    neg-int v8, v3

    invoke-virtual {p0, v8}, Lrexsee/core/widget/HScrollView;->fling(I)V

    .line 290
    :cond_4
    :goto_3
    iput v11, p0, Lrexsee/core/widget/HScrollView;->mActivePointerId:I

    .line 291
    iput-boolean v10, p0, Lrexsee/core/widget/HScrollView;->mIsBeingDragged:Z

    .line 292
    invoke-direct {p0}, Lrexsee/core/widget/HScrollView;->recycleVelocityTracker()V

    goto/16 :goto_0

    .line 286
    :cond_5
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->invalidate()V

    goto :goto_3

    .line 297
    .end local v3    # "initialVelocity":I
    .end local v6    # "velocityTracker":Landroid/view/VelocityTracker;
    :pswitch_4
    iget-boolean v8, p0, Lrexsee/core/widget/HScrollView;->mIsBeingDragged:Z

    if-eqz v8, :cond_0

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getChildCount()I

    move-result v8

    if-lez v8, :cond_0

    .line 298
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->invalidate()V

    .line 299
    iput v11, p0, Lrexsee/core/widget/HScrollView;->mActivePointerId:I

    .line 300
    iput-boolean v10, p0, Lrexsee/core/widget/HScrollView;->mIsBeingDragged:Z

    .line 301
    invoke-direct {p0}, Lrexsee/core/widget/HScrollView;->recycleVelocityTracker()V

    goto/16 :goto_0

    .line 306
    :pswitch_5
    invoke-direct {p0, p1}, Lrexsee/core/widget/HScrollView;->onSecondaryPointerUp(Landroid/view/MotionEvent;)V

    goto/16 :goto_0

    .line 247
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_3
        :pswitch_2
        :pswitch_4
        :pswitch_0
        :pswitch_0
        :pswitch_5
    .end packed-switch
.end method

.method public pageScroll(I)Z
    .locals 7
    .param p1, "direction"    # I

    .prologue
    const/4 v6, 0x0

    .line 450
    const/16 v4, 0x42

    if-ne p1, v4, :cond_1

    const/4 v4, 0x1

    move v1, v4

    .line 451
    .local v1, "right":Z
    :goto_0
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getWidth()I

    move-result v3

    .line 453
    .local v3, "width":I
    if-eqz v1, :cond_2

    .line 454
    iget-object v4, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v5

    add-int/2addr v5, v3

    iput v5, v4, Landroid/graphics/Rect;->left:I

    .line 455
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getChildCount()I

    move-result v0

    .line 456
    .local v0, "count":I
    if-lez v0, :cond_0

    .line 457
    invoke-virtual {p0, v6}, Lrexsee/core/widget/HScrollView;->getChildAt(I)Landroid/view/View;

    move-result-object v2

    .line 458
    .local v2, "view":Landroid/view/View;
    iget-object v4, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    iget v4, v4, Landroid/graphics/Rect;->left:I

    add-int/2addr v4, v3

    invoke-virtual {v2}, Landroid/view/View;->getRight()I

    move-result v5

    if-le v4, v5, :cond_0

    .line 459
    iget-object v4, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    invoke-virtual {v2}, Landroid/view/View;->getRight()I

    move-result v5

    sub-int/2addr v5, v3

    iput v5, v4, Landroid/graphics/Rect;->left:I

    .line 468
    .end local v0    # "count":I
    .end local v2    # "view":Landroid/view/View;
    :cond_0
    :goto_1
    iget-object v4, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    iget-object v5, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    iget v5, v5, Landroid/graphics/Rect;->left:I

    add-int/2addr v5, v3

    iput v5, v4, Landroid/graphics/Rect;->right:I

    .line 470
    iget-object v4, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    iget v4, v4, Landroid/graphics/Rect;->left:I

    iget-object v5, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    iget v5, v5, Landroid/graphics/Rect;->right:I

    invoke-direct {p0, p1, v4, v5}, Lrexsee/core/widget/HScrollView;->scrollAndFocus(III)Z

    move-result v4

    return v4

    .end local v1    # "right":Z
    .end local v3    # "width":I
    :cond_1
    move v1, v6

    .line 450
    goto :goto_0

    .line 463
    .restart local v1    # "right":Z
    .restart local v3    # "width":I
    :cond_2
    iget-object v4, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v5

    sub-int/2addr v5, v3

    iput v5, v4, Landroid/graphics/Rect;->left:I

    .line 464
    iget-object v4, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    iget v4, v4, Landroid/graphics/Rect;->left:I

    if-gez v4, :cond_0

    .line 465
    iget-object v4, p0, Lrexsee/core/widget/HScrollView;->mTempRect:Landroid/graphics/Rect;

    iput v6, v4, Landroid/graphics/Rect;->left:I

    goto :goto_1
.end method

.method public requestChildFocus(Landroid/view/View;Landroid/view/View;)V
    .locals 1
    .param p1, "child"    # Landroid/view/View;
    .param p2, "focused"    # Landroid/view/View;

    .prologue
    .line 314
    iget-boolean v0, p0, Lrexsee/core/widget/HScrollView;->mIsLayoutDirty:Z

    if-nez v0, :cond_0

    .line 315
    invoke-direct {p0, p2}, Lrexsee/core/widget/HScrollView;->scrollToChild(Landroid/view/View;)V

    .line 319
    :goto_0
    invoke-super {p0, p1, p2}, Landroid/widget/FrameLayout;->requestChildFocus(Landroid/view/View;Landroid/view/View;)V

    .line 320
    return-void

    .line 317
    :cond_0
    iput-object p2, p0, Lrexsee/core/widget/HScrollView;->mChildToScrollTo:Landroid/view/View;

    goto :goto_0
.end method

.method public requestChildRectangleOnScreen(Landroid/view/View;Landroid/graphics/Rect;Z)Z
    .locals 3
    .param p1, "child"    # Landroid/view/View;
    .param p2, "rectangle"    # Landroid/graphics/Rect;
    .param p3, "immediate"    # Z

    .prologue
    .line 346
    invoke-virtual {p1}, Landroid/view/View;->getLeft()I

    move-result v0

    invoke-virtual {p1}, Landroid/view/View;->getScrollX()I

    move-result v1

    sub-int/2addr v0, v1

    invoke-virtual {p1}, Landroid/view/View;->getTop()I

    move-result v1

    invoke-virtual {p1}, Landroid/view/View;->getScrollY()I

    move-result v2

    sub-int/2addr v1, v2

    invoke-virtual {p2, v0, v1}, Landroid/graphics/Rect;->offset(II)V

    .line 347
    invoke-direct {p0, p2, p3}, Lrexsee/core/widget/HScrollView;->scrollToChildRect(Landroid/graphics/Rect;Z)Z

    move-result v0

    return v0
.end method

.method public requestDisallowInterceptTouchEvent(Z)V
    .locals 0
    .param p1, "disallowIntercept"    # Z

    .prologue
    .line 169
    if-eqz p1, :cond_0

    .line 170
    invoke-direct {p0}, Lrexsee/core/widget/HScrollView;->recycleVelocityTracker()V

    .line 172
    :cond_0
    invoke-super {p0, p1}, Landroid/widget/FrameLayout;->requestDisallowInterceptTouchEvent(Z)V

    .line 173
    return-void
.end method

.method public requestLayout()V
    .locals 1

    .prologue
    .line 352
    const/4 v0, 0x1

    iput-boolean v0, p0, Lrexsee/core/widget/HScrollView;->mIsLayoutDirty:Z

    .line 353
    invoke-super {p0}, Landroid/widget/FrameLayout;->requestLayout()V

    .line 354
    return-void
.end method

.method public scrollTo(II)V
    .locals 3
    .param p1, "x"    # I
    .param p2, "y"    # I

    .prologue
    .line 384
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getChildCount()I

    move-result v1

    if-lez v1, :cond_1

    .line 385
    const/4 v1, 0x0

    invoke-virtual {p0, v1}, Lrexsee/core/widget/HScrollView;->getChildAt(I)Landroid/view/View;

    move-result-object v0

    .line 386
    .local v0, "child":Landroid/view/View;
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getWidth()I

    move-result v1

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getPaddingRight()I

    move-result v2

    sub-int/2addr v1, v2

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getPaddingLeft()I

    move-result v2

    sub-int/2addr v1, v2

    invoke-virtual {v0}, Landroid/view/View;->getWidth()I

    move-result v2

    invoke-direct {p0, p1, v1, v2}, Lrexsee/core/widget/HScrollView;->clamp(III)I

    move-result p1

    .line 387
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getHeight()I

    move-result v1

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getPaddingBottom()I

    move-result v2

    sub-int/2addr v1, v2

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getPaddingTop()I

    move-result v2

    sub-int/2addr v1, v2

    invoke-virtual {v0}, Landroid/view/View;->getHeight()I

    move-result v2

    invoke-direct {p0, p2, v1, v2}, Lrexsee/core/widget/HScrollView;->clamp(III)I

    move-result p2

    .line 388
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v1

    if-ne p1, v1, :cond_0

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollY()I

    move-result v1

    if-eq p2, v1, :cond_1

    .line 389
    :cond_0
    invoke-super {p0, p1, p2}, Landroid/widget/FrameLayout;->scrollTo(II)V

    .line 392
    .end local v0    # "child":Landroid/view/View;
    :cond_1
    return-void
.end method

.method public final smoothScrollBy(II)V
    .locals 11
    .param p1, "dx"    # I
    .param p2, "dy"    # I

    .prologue
    const/4 v10, 0x0

    .line 585
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getChildCount()I

    move-result v6

    if-nez v6, :cond_0

    .line 606
    :goto_0
    return-void

    .line 589
    :cond_0
    invoke-static {}, Landroid/view/animation/AnimationUtils;->currentAnimationTimeMillis()J

    move-result-wide v6

    iget-wide v8, p0, Lrexsee/core/widget/HScrollView;->mLastScroll:J

    sub-long v0, v6, v8

    .line 590
    .local v0, "duration":J
    const-wide/16 v6, 0xfa

    cmp-long v6, v0, v6

    if-lez v6, :cond_1

    .line 591
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getWidth()I

    move-result v6

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getPaddingRight()I

    move-result v7

    sub-int/2addr v6, v7

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getPaddingLeft()I

    move-result v7

    sub-int v5, v6, v7

    .line 592
    .local v5, "width":I
    invoke-virtual {p0, v10}, Lrexsee/core/widget/HScrollView;->getChildAt(I)Landroid/view/View;

    move-result-object v6

    invoke-virtual {v6}, Landroid/view/View;->getWidth()I

    move-result v3

    .line 593
    .local v3, "right":I
    sub-int v6, v3, v5

    invoke-static {v10, v6}, Ljava/lang/Math;->max(II)I

    move-result v2

    .line 594
    .local v2, "maxX":I
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v4

    .line 595
    .local v4, "scrollX":I
    add-int v6, v4, p1

    invoke-static {v6, v2}, Ljava/lang/Math;->min(II)I

    move-result v6

    invoke-static {v10, v6}, Ljava/lang/Math;->max(II)I

    move-result v6

    sub-int p1, v6, v4

    .line 597
    iget-object v6, p0, Lrexsee/core/widget/HScrollView;->mScroller:Landroid/widget/Scroller;

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollY()I

    move-result v7

    invoke-virtual {v6, v4, v7, p1, v10}, Landroid/widget/Scroller;->startScroll(IIII)V

    .line 598
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->invalidate()V

    .line 605
    .end local v2    # "maxX":I
    .end local v3    # "right":I
    .end local v4    # "scrollX":I
    .end local v5    # "width":I
    :goto_1
    invoke-static {}, Landroid/view/animation/AnimationUtils;->currentAnimationTimeMillis()J

    move-result-wide v6

    iput-wide v6, p0, Lrexsee/core/widget/HScrollView;->mLastScroll:J

    goto :goto_0

    .line 600
    :cond_1
    iget-object v6, p0, Lrexsee/core/widget/HScrollView;->mScroller:Landroid/widget/Scroller;

    invoke-virtual {v6}, Landroid/widget/Scroller;->isFinished()Z

    move-result v6

    if-nez v6, :cond_2

    .line 601
    iget-object v6, p0, Lrexsee/core/widget/HScrollView;->mScroller:Landroid/widget/Scroller;

    invoke-virtual {v6}, Landroid/widget/Scroller;->abortAnimation()V

    .line 603
    :cond_2
    invoke-virtual {p0, p1, p2}, Lrexsee/core/widget/HScrollView;->scrollBy(II)V

    goto :goto_1
.end method

.method public final smoothScrollTo(II)V
    .locals 2
    .param p1, "x"    # I
    .param p2, "y"    # I

    .prologue
    .line 609
    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollX()I

    move-result v0

    sub-int v0, p1, v0

    invoke-virtual {p0}, Lrexsee/core/widget/HScrollView;->getScrollY()I

    move-result v1

    sub-int v1, p2, v1

    invoke-virtual {p0, v0, v1}, Lrexsee/core/widget/HScrollView;->smoothScrollBy(II)V

    .line 610
    return-void
.end method
